3.3.72 \(\int \csc ^3(c+d x) (a+b \sec (c+d x))^n \, dx\) [272]

Optimal. Leaf size=231 \[ \frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b) d (1+n)}-\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b) d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)} \]

[Out]

1/4*hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/(a-b))*(a+b*sec(d*x+c))^(1+n)/(a-b)/d/(1+n)-1/4*hypergeom([1, 1+
n],[2+n],(a+b*sec(d*x+c))/(a+b))*(a+b*sec(d*x+c))^(1+n)/(a+b)/d/(1+n)+1/4*b*hypergeom([2, 1+n],[2+n],(a+b*sec(
d*x+c))/(a-b))*(a+b*sec(d*x+c))^(1+n)/(a-b)^2/d/(1+n)+1/4*b*hypergeom([2, 1+n],[2+n],(a+b*sec(d*x+c))/(a+b))*(
a+b*sec(d*x+c))^(1+n)/(a+b)^2/d/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3959, 186, 70, 726} \begin {gather*} \frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{4 d (n+1) (a-b)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{4 d (n+1) (a+b)}+\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{4 d (n+1) (a-b)^2}+\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{4 d (n+1) (a+b)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^3*(a + b*Sec[c + d*x])^n,x]

[Out]

(Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x])^(1 + n))/(4*(a - b)*d*(
1 + n)) - (Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n))/(4*(
a + b)*d*(1 + n)) + (b*Hypergeometric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x])^(
1 + n))/(4*(a - b)^2*d*(1 + n)) + (b*Hypergeometric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*S
ec[c + d*x])^(1 + n))/(4*(a + b)^2*d*(1 + n))

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 186

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_))^(q_), x
_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b, c, d,
e, f, g, h, m, n}, x] && IntegersQ[p, q]

Rule 726

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m, 1/(a + c*x^2
), x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[m]

Rule 3959

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Dist[-f^(-1), Subs
t[Int[(-1 + x)^((p - 1)/2)*(1 + x)^((p - 1)/2)*((a + b*x)^m/x^(p + 1)), x], x, Csc[e + f*x]], x] /; FreeQ[{a,
b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \csc ^3(c+d x) (a+b \sec (c+d x))^n \, dx &=-\frac {\text {Subst}\left (\int \frac {x^2 (a-b x)^n}{(-1+x)^2 (1+x)^2} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {(a-b x)^n}{4 (-1+x)^2}+\frac {(a-b x)^n}{4 (1+x)^2}+\frac {(a-b x)^n}{2 \left (-1+x^2\right )}\right ) \, dx,x,-\sec (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{(-1+x)^2} \, dx,x,-\sec (c+d x)\right )}{4 d}-\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{(1+x)^2} \, dx,x,-\sec (c+d x)\right )}{4 d}-\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{-1+x^2} \, dx,x,-\sec (c+d x)\right )}{2 d}\\ &=\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}-\frac {\text {Subst}\left (\int \left (-\frac {(a-b x)^n}{2 (1-x)}-\frac {(a-b x)^n}{2 (1+x)}\right ) \, dx,x,-\sec (c+d x)\right )}{2 d}\\ &=\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}+\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{1-x} \, dx,x,-\sec (c+d x)\right )}{4 d}+\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{1+x} \, dx,x,-\sec (c+d x)\right )}{4 d}\\ &=\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b) d (1+n)}-\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b) d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(513\) vs. \(2(231)=462\).
time = 13.80, size = 513, normalized size = 2.22 \begin {gather*} \frac {\left (\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )^n \left (\cos (c+d x) \sec ^4\left (\frac {1}{2} (c+d x)\right )\right )^{-n} \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^{-n} (a+b \sec (c+d x))^n \left (\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}\right )^n \left (1-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^{-2 n} \left (1-\tan ^4\left (\frac {1}{2} (c+d x)\right )\right )^n \left (2 (a+b+b n) \, _2F_1\left (1,-n;1-n;\frac {(a+b) \cos (c+d x)}{b+a \cos (c+d x)}\right ) \left (1-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^n+\left (\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{b}\right )^{-n} \left (-2 (a+b+b n) \, _2F_1\left (-n,-n;1-n;\frac {(a-b) \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )}{2 b}\right ) \left (2-2 \tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^n+\frac {2^{-n} n (b+a \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right ) \left (1-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^n \left (-2 a \, _2F_1\left (n,1+n;2+n;\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{2 b}\right ) \left (-\frac {(a-b) \cos (c+d x) (b+a \cos (c+d x)) \sec ^4\left (\frac {1}{2} (c+d x)\right )}{b^2}\right )^n \tan ^2\left (\frac {1}{2} (c+d x)\right )+2^n (a-b) (1+n) \left (\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{b}\right )^n \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right )}{(a-b) (1+n)}\right )\right )}{8 (a+b) d n} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Csc[c + d*x]^3*(a + b*Sec[c + d*x])^n,x]

[Out]

((Cos[c + d*x]*Sec[(c + d*x)/2]^2)^n*(a + b*Sec[c + d*x])^n*((1 - Tan[(c + d*x)/2]^2)^(-1))^n*(1 - Tan[(c + d*
x)/2]^4)^n*(2*(a + b + b*n)*Hypergeometric2F1[1, -n, 1 - n, ((a + b)*Cos[c + d*x])/(b + a*Cos[c + d*x])]*(1 -
Tan[(c + d*x)/2]^2)^n + (-2*(a + b + b*n)*Hypergeometric2F1[-n, -n, 1 - n, ((a - b)*(-1 + Tan[(c + d*x)/2]^2))
/(2*b)]*(2 - 2*Tan[(c + d*x)/2]^2)^n + (n*(b + a*Cos[c + d*x])*Csc[(c + d*x)/2]^2*(1 - Tan[(c + d*x)/2]^2)^n*(
-2*a*Hypergeometric2F1[n, 1 + n, 2 + n, ((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2)/(2*b)]*(-(((a - b)*Cos[c + d
*x]*(b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^4)/b^2))^n*Tan[(c + d*x)/2]^2 + 2^n*(a - b)*(1 + n)*(((b + a*Cos[c +
 d*x])*Sec[(c + d*x)/2]^2)/b)^n*(-1 + Tan[(c + d*x)/2]^2)))/(2^n*(a - b)*(1 + n)))/(((b + a*Cos[c + d*x])*Sec[
(c + d*x)/2]^2)/b)^n))/(8*(a + b)*d*n*(Cos[c + d*x]*Sec[(c + d*x)/2]^4)^n*(Cos[(c + d*x)/2]^2*Sec[c + d*x])^n*
(1 - Tan[(c + d*x)/2]^2)^(2*n))

________________________________________________________________________________________

Maple [F]
time = 0.10, size = 0, normalized size = 0.00 \[\int \left (\csc ^{3}\left (d x +c \right )\right ) \left (a +b \sec \left (d x +c \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^3*(a+b*sec(d*x+c))^n,x)

[Out]

int(csc(d*x+c)^3*(a+b*sec(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*csc(d*x + c)^3, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*sec(d*x + c) + a)^n*csc(d*x + c)^3, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**3*(a+b*sec(d*x+c))**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^n*csc(d*x + c)^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n}{{\sin \left (c+d\,x\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(c + d*x))^n/sin(c + d*x)^3,x)

[Out]

int((a + b/cos(c + d*x))^n/sin(c + d*x)^3, x)

________________________________________________________________________________________